package gtkwire.listener.connector;

import gtkwire.*;
import gtkwire.widget.GtkWidget;
import gtkwire.listener.FilteringGTKMessageListener;
import gtkwire.listener.WindowDestroyedListener;

public class WindowDestroyedListenerFilter extends FilteringGTKMessageListener
{
	private WindowDestroyedListener l;

	public WindowDestroyedListenerFilter( WindowDestroyedListener l )
	{
		super( l );
		this.l = l;
		addFilteringWidgetType( GtkWidget.WT_GtkWindow );
		addFilteringSignal( GTKWireSignal.DESTROY );
		setMatchMode( this.MUST_MATCH_ALL );
	}
	
	public void filteredMessage( GTKWireMessage msg )
	{
		l.windowDestroyed();
	}

}//end class